// 任务接口定义
export interface Task {
  id: number;
  code: string;
  title: string;
  description: string;
  type: '功能开发' | '缺陷修复' | '性能优化' | '文档编写' | '测试任务';
  project: string;
  status: '待处理' | '进行中' | '待测试' | '待验收' | '已完成' | '已取消';
  priority: '低' | '中' | '高' | '紧急';
  assignee: string;
  reporter: string;
  progress: number;
  estimatedHours: number;
  actualHours: number;
  deadline: string;
  createdAt: string;
  updatedAt: string;
  tags: string[];
  attachments: string[];
  parentTask?: number;
  subtasks?: Task[];
  relatedRequirement?: string;
  relatedBug?: string;
}

// 任务API请求参数接口
export interface GetTasksParams {
  page?: number;
  pageSize?: number;
  search?: string;
  type?: string;
  project?: string;
  status?: string;
  priority?: string;
  assignee?: string;
}

// 任务统计接口
export interface TaskStats {
  total: number;
  inProgress: number;
  completed: number;
  overdue: number;
  highPriority: number;
}

// 任务状态分布接口
export interface TaskStatusDistribution {
  status: string;
  count: number;
  color: string;
}

// 任务看板列接口
export interface TaskBoardColumn {
  id: string;
  title: string;
  status: string;
  tasks: Task[];
}